package org.znxs.comfriend.models;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class User implements Serializable {
    private String id;
    private String username;
    private String password;
    private String nickname;
    private String gender;
    private String avatarUrl;

    private String category;
    private String bio; // 简介
    private boolean isActive;
    private List<String> images = new ArrayList<>();  // 私人相册集

    private Map<String,List<Message>> messageHashMap = new HashMap<>(); //聊天对象存储

    // 构造函数、getter和setter方法
    public User() {
    }

    public User(String id, String username, String password, String nickname, String gender, String avatarUrl, String category, String bio, boolean isActive, List<String> images, Map<String, List<Message>> messageHashMap) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.gender = gender;
        this.avatarUrl = avatarUrl;
        this.category = category;
        this.bio = bio;
        this.isActive = isActive;
        this.images = images;
        this.messageHashMap = messageHashMap;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }


    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getBio() {
        return bio;
    }

    public void setBio(String bio) {
        this.bio = bio;
    }

    public boolean isActive() {
        return isActive;
    }

    public void setActive(boolean active) {
        isActive = active;
    }

    public List<String> getImages() {
        return images;
    }

    public void setImages(List<String> images) {
        this.images = images;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Map<String, List<Message>> getMessageHashMap() {
        return messageHashMap;
    }

    public void setMessageHashMap(Map<String, List<Message>> messageHashMap) {
        this.messageHashMap = messageHashMap;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", gender='" + gender + '\'' +
                ", avatarUrl='" + avatarUrl + '\'' +
                ", category='" + category + '\'' +
                ", bio='" + bio + '\'' +
                ", isActive=" + isActive +
                ", images=" + images +
                ", messageHashMap=" + messageHashMap +
                '}';
    }
}